package com.ywqf_api.common.datatables;

import com.ywqf_api.util.CamelNamingUtil;

import javax.validation.constraints.NotNull;


public abstract class PagingDto {
	@NotNull(message="分页信息不完整")
	private Integer start;
	@NotNull(message="分页信息不完整")
	private Integer length;
	@NotNull(message="分页信息不完整")
	private Integer draw;
	private String sort;
	private String sortName;
	
	public Integer getStart() {
		return start;
	}
	public void setStart(Integer start) {
		this.start = start;
	}
	public Integer getLength() {
		return length;
	}
	public void setLength(Integer length) {
		this.length = length;
	}
	public Integer getDraw() {
		return draw;
	}
	public void setDraw(Integer draw) {
		this.draw = draw;
	}
	public String getSort() {
		return sort;
	}
	public void setSort(String sort) {
		this.sort = sort;
	}
	public String getSortName() {
		return sortName;
	}
	public void setSortName(String sortName) {
		this.sortName = CamelNamingUtil.camelToUnderline(sortName);
	}
	@Override
	public String toString() {
		return "PagingDto [start=" + start + ", length=" + length + ", draw="
				+ draw + ", sort=" + sort + ", sortName=" + sortName + "]";
	}
	
}
